package com.zzmx.springboot.atomikos.service.impl;

import com.zzmx.springboot.atomikos.entity.News;
import com.zzmx.springboot.atomikos.mapper.test1.NewsMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author liuxc
 * @Description:
 * @create 2018-04-20 9:36
 **/
@Service
public class NewsServiceImpl {

    @Autowired
    private NewsMapper mapper;

    public News findById(News news) {
        return mapper.findById(news);
    }

    public List<News> list(News news) {
        return mapper.list(news);
    }

    public int count(News news) {
        return mapper.count(news);
    }

    public int insert(News news) {
        return mapper.insert(news);
    }


    public int update(News news) {
        return mapper.update(news);
    }

    public int updateState(News news) {
        return mapper.updateState(news);
    }

}
